//
//  LXSystemMessageCell.m
//  lixing
//
//  Created by ypj on 2021/12/3.
//

#import "LXSystemMessageCell.h"

@implementation LXSystemMessageCell


- (instancetype)initWithFrame:(CGRect)frame{
    if (self == [super initWithFrame:frame]) {
        [self addSubview:self.lineView];
    }
    return self;
}

- (UIImageView *)iconImg
{
    if (!_iconImg) {
        self.iconImg = [[UIImageView alloc] initWithFrame:CGRectMake(10, 15, 46, 46)];
        [self addSubview:_iconImg];
    }
    return _iconImg;
}

- (UILabel *)titleLB
{
    if (!_titleLB) {
        self.titleLB = [[UILabel alloc] initWithFrame:CGRectMake(_iconImg.X_width + 12, 16, 200, 24)];
        _titleLB.font = [UIFont boldSystemFontOfSize:17];
        _titleLB.textColor = UIColor.blackColor;
        [self addSubview:_titleLB];
    }
    return _titleLB;
}
- (UILabel *)contentLB
{
    if (!_contentLB) {
        self.contentLB = [[UILabel alloc] initWithFrame:CGRectMake(_titleLB.X, _titleLB.Y_height + 5, ScreenWidth - _iconImg.X_width - 70, 20)];
        _contentLB.textColor = ColorWithAAAAAA;
        _contentLB.font = [UIFont systemFontOfSize:14];
        [self addSubview:_contentLB];
    }
    return _contentLB;
}
- (UILabel *)timeLB
{
    if (!_timeLB) {
        self.timeLB = [[UILabel alloc] initWithFrame:CGRectMake(ScreenWidth - 15 - 100, 17, 100, 12)];
        _timeLB.font = [UIFont systemFontOfSize:12];
        _timeLB.textColor = ColorWithAAAAAA;
        _timeLB.textAlignment = NSTextAlignmentRight;
        [self addSubview:_timeLB];
    }
    return _timeLB;
}
- (UILabel *)badgeLB{
    if (!_badgeLB) {
        self.badgeLB = [[UILabel alloc] initWithFrame:CGRectMake(self.iconImg.X_width - 12, self.iconImg.top - 5, 18, 18)];
        _badgeLB.adjustsFontSizeToFitWidth = YES;
//        _badgeLB.backgroundColor = ColorWithFF5758;
        _badgeLB.backgroundColor = UIColor.redColor;
        _badgeLB.font = [UIFont systemFontOfSize:10];
        [_badgeLB addCorner:9 AndLine:UIColor.whiteColor];
        _badgeLB.textAlignment = NSTextAlignmentCenter;
        _badgeLB.textColor = [UIColor whiteColor];
        [self addSubview:_badgeLB];
    }
    return _badgeLB;
}

- (UIView *)lineView
{
    if (!_lineView) {
        self.lineView = [[UIView alloc] initWithFrame:CGRectMake(15, self.height - 1, ScreenWidth - 30, 0.5)];
        self.lineView.backgroundColor = [[UIColor colorWithHexString:@"#000000"] colorWithAlphaComponent:0.2];
        [self addSubview:_lineView];
    }
    return _lineView;
}






@end
